package com.china08.yxyapi.repository.mg.homework;

import java.util.List;
import java.util.Set;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.homework.HomeworkTask;

/**
 * 作业系统: 发布的作业
 * 
 * @author Richard Wang
 *
 */
public interface HomeworkTaskRepository extends MongoRepository<HomeworkTask, String> {

    void deleteById(String taskId);

    HomeworkTask findById(String taskId);

    List<HomeworkTask> findBySchoolIdAndSource(String schoolId, int i);

    List<HomeworkTask> findByPublishUserIdAndSchoolId(String userId, String schoolId);

    List<HomeworkTask> findByIfNeedSumbit(Boolean isneedsubmit);

    List<HomeworkTask> findByIdIn(Set<String> keySet);

    List<HomeworkTask> findBySourceNotAndTaskType(int i, String string);

    List<HomeworkTask> findByIfNeedSumbitAndIdIn(boolean b, Set<String> idsSet);

}
